package 集合进阶.双列集合.TreeMap集合;

import com.sun.source.tree.Tree;

import java.util.TreeMap;

public class Text {
    public static void main(String[] args) {
        //1.创建TreeMap集合
        TreeMap<Student,String> tm=new TreeMap<>();

        //2.创建3个学生对象
        Student stu1=new Student("zhangsan",23);
        Student stu2=new Student("lisi",24);
        Student stu3=new Student("wanwu",25);

        //3.添加集合
        tm.put(stu1,"四川");
        tm.put(stu2,"江苏");
        tm.put(stu3,"湖南");

        System.out.println(tm);
    }
}
